import subprocess
import pickle


def escalate_to_agent(reason=None):
    return f"升级至客服代理: {reason}" if reason else "升级至客服代理"


def case_resolved():
    return "问题已解决。无更多问题。"


def Evoke_hot_spot_analysis_capabilities():
    proc = subprocess.Popen(["streamlit", "run", "Customs_agent_assistant/hsa-master/src/app.py"])
    pid = proc.pid
    with open("app_process.pid", "wb") as f:
        pickle.dump(pid, f)

